package org.jiajie.coffeecodes.concurrent.pool;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * @author jie
 */
public class ThreadPoolExecutorTest1 {

    public static void main(String[] args) {
        ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(
                10, 10,
                0L, TimeUnit.MILLISECONDS,
                new ArrayBlockingQueue<>(10)
        );
        threadPoolExecutor.execute(() -> {
            System.out.println("Hi thread pool!");
        });
        threadPoolExecutor.shutdown();
    }
}
